/*
 *  This file is part of Cha++ers.
 *
 *  Cha++ers is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Cha++ers is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Cha++ers.  If not, see <http://www.gnu.org/licenses/>.
*/

#include "gtk/gtk.h"


static void Hide_Prefs(GtkWidget* widget, GtkWidget* prefwin)
{
	gtk_widget_destroy(prefwin);
}

void Show_Prefs()
{
	GtkWidget *prefwin;
	GtkWidget *vbox;

	/* create a new window */
	prefwin = gtk_window_new (GTK_WINDOW_TOPLEVEL);
	gtk_window_set_default_size (GTK_WINDOW(prefwin),640,480);
	gtk_window_set_title (GTK_WINDOW (prefwin), "Cha++ers Preferences");
	g_signal_connect (G_OBJECT (prefwin), "destroy",
	                  G_CALLBACK (Hide_Prefs), (gpointer)prefwin);
	g_signal_connect_swapped (G_OBJECT (prefwin), "delete_event",
	                          G_CALLBACK (Hide_Prefs),
	                          (gpointer)prefwin);

	vbox = gtk_vbox_new (FALSE, 0);
	gtk_container_add (GTK_CONTAINER (prefwin), vbox);

	gtk_widget_show_all (prefwin);
}
